package com.cq.hd.member.service;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.*;
import com.cq.hd.member.api.vo.*;
import com.cq.hd.member.po.TbBusinessPo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 商家表 服务类
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-21
 */
public interface TbBusinessService extends IService<TbBusinessPo> {

    Page<BusinessPageVo> pageBusiness(BusinessPageDto businessPageDto);

    Page<BusinessPointsMallPageVo> pagePointsMallBusiness(BusinessPointsMallPageDto businessPointsMallPageDto);

    AdminBusinessPageVo details(Long id);

    InviteMerchantVo invite(BusinessInviteDto businessInviteDto);

    Boolean unBindMerchant(BusinessMerchantUnBindDto businessMerchantUnBindDto);

    Page<RelationMerchantPageVo> pageRelationMerchant(RelationMerchantPageDto relationMerchantPageDto);

    List<Long> listRelationMerchantId(Long userId, Long businessId);

    BusinessPageVo getByUserId(Long userId);

    BusinessHomePageVo getHomePage(Long id, Long userId);

    Boolean updateHomePage(UpdateHomePageDto updateHomePageDto);

    BusinessShareVo shareHomePage(BusinessShareDto businessShareDto);

    BusinessPageVo getByMobile(String mobile);

    List<BusinessVo> listBusinessByIds(List<Long> ids);

    Page<BusinessVo> searchByBusinessName(Integer pageNum, Integer pageSize, String keyword);

    BusinessVo getActiveCount(Long userId, Long businessId);

    Boolean subActiveCount(UpdateActiveCountDto updateActiveCountDto);

    Boolean scanBusinessMemberExpireJob();

    BusinessPageVo getByInviteCode(String inviteCode);

    Integer getNewCountByDate(String startTime, String endTime);

    BusinessPageVo getBusinessById(Long businessId);

    List<BusinessDetailVo> listDetailByIds(List<Long> businessIds);

    Boolean subSubsidyAmt(BusinessSubSubsidyAmtDto businessSubSubsidyAmtDto);

    void scanSubsidyWaitPayJob();

    void scanSubsidyWaitTransferJob();

    // 商家分享海报是否展示商家头像开关
    Integer updatePosterShowAvatarState(Long businessId, Integer posterShowAvatarState);

    // 开启积分商城
    Boolean openPointsMall(Long businessId);

    // 关闭积分商城
    Boolean closePointsMall(Long businessId);

    // 商家积分商城主页
    BusinessPointsMallHomePageVo getPointsMallHomePage(Long businessId, Long userId);

    // 分享积分商城
    BusinessPointsMallShareVo sharePointsMall(Long businessId);
}